package xyz.penghaonan.p2plib.helper.message;

import android.os.Bundle;

public abstract class BaseResponseMsg extends BaseMsg {
    private long requestId;

    public static final String EXTRA_SUCCESS = "success";

    private final Bundle data = new Bundle();

    public void setRequestId(long requestId) {
        this.requestId = requestId;
    }

    public boolean isSuccess() {
        return data.getBoolean(EXTRA_SUCCESS);
    }

    public void setSuccess(boolean success) {
        data.putBoolean(EXTRA_SUCCESS, success);
    }

    public long getRequestId() {
        return requestId;
    }

    public void send() {
        MsgSender.sendMsg(this, null);
    }
}
